package com.zhuang.string;

public class StringTest {
	public static void main(String[] args) {
		// 线程不安全
		StringBuilder sb = new StringBuilder();
		System.out.println(sb);
		sb.append("123");
		System.out.println(sb);

		// 线程安全
		StringBuffer stringBuffer = new StringBuffer();
		stringBuffer.append('a');
		stringBuffer.append('b');
		stringBuffer.append('c');
		System.out.println(stringBuffer);
	}
}
